package com.qn.entity;

import cn.crane4j.annotation.Assemble;
import cn.crane4j.annotation.Mapping;
import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data  // 使用 lombok 生成构造器、getter/setter 方法
@RequiredArgsConstructor
public class Foo {
     // 根据 id 填充 name
    @Assemble(container = "user", props = @Mapping(ref = "name"))
    private final Integer id;
    private String name;
}